package com.vrv.app.cyberspace.modules.sys.controller;


import com.vrv.app.cyberspace.common.utils.JSONResult;
import com.vrv.app.cyberspace.modules.sys.entity.FeedbackTable;
import com.vrv.app.cyberspace.modules.sys.service.IFeedbackTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.vrv.app.cyberspace.common.utils.JSONResult.renderSuccess;
import static com.vrv.app.cyberspace.common.utils.JSONResult.renderError;

/**
 * <p>
 * 每日零报告反馈表-前端控制器
 * </p>
 *
 * @author sm
 * @since 2017-12-15
 */
@RestController
@RequestMapping("/sys/feedbackTable")
public class FeedbackTableController extends BaseController {


    @Autowired
    private IFeedbackTableService feedbackTableService;

    /**
     * 每日零报告反馈-填写
     */
    @RequestMapping("/update")
    public JSONResult updateFeedback(FeedbackTable feedbackTable) {
        return feedbackTableService.updateFeedback(feedbackTable) ? renderSuccess() : renderError();
    }


    /**
     * 每日零详情中的报告汇总
     */
    @RequestMapping("/summary")
    public JSONResult summaryFeedback(FeedbackTable feedbackTable) {
        return feedbackTableService.summaryFeedback(feedbackTable);
    }
}

